import request from '@/utils/request'

// 自动回复规则列表
export function listReplyRule(query) {
  return request({
    url: '/wx/replyrule/list',
    method: 'get',
    params: query
  })
}

// 查询自动回复规则详细
export function getReplyRule(configId) {
  return request({
    url: '/wx/replyrule/' + configId,
    method: 'get'
  })
}

// 新增自动回复规则配置
export function addReplyRule(data) {
  return request({
    url: '/wx/replyrule/create',
    method: 'post',
    data: data
  })
}

// 修改自动回复规则配置
export function updateReplyRule(id,data) {
  return request({
    url: '/wx/replyrule/update/' + id,
    method: 'put',
    data: data
  })
}

// 删除自动回复规则配置
export function delReplyRule(configId) {
  return request({
    url: '/wx/replyrule/deleteByIds/' + configId,
    method: 'delete'
  })
}

// 导出自动回复规则
export function exportReplyRule(query) {
  return request({
    url: '/wx/replyrule/export',
    method: 'get',
    responseType:'blob',
    params: query
  })
}
